package net.yambal.mobile.adv
{
	import mx.collections.ArrayCollection;

	public class ADV_SelectItem implements IADV_ParagraphItem
	{
		private var _text:String = null;
		private var _option:ArrayCollection = null;
		
		public function ADV_SelectItem()
		{
			_option = new ArrayCollection();
		}
		
		public function get type():String
		{
			return "select";
		}
		
		public function set text(text:String):void
		{
			_text = text;
		}
		
		public function get text():String
		{
			return _text;
		}
		
		public function addOption(text:String, goto_chapter_id:String, goto_paragraph_id:String, selected_text:String):void{
			trace(text + ":" + goto_chapter_id + "," + goto_paragraph_id);
			var option:ADV_SelectItemOption = new ADV_SelectItemOption();
			option.label = text;
			option.goto_chapter_id = goto_chapter_id;
			option.goto_paragraph_id = goto_paragraph_id;
			option.selected_text = selected_text;
			_option.addItem(option);
		}
		
		public function get option():ArrayCollection{
			return _option;
		}
	}
}